/**
 * 将常用的插件方法导向到这里
 * 自定义方法也可以放在这里
 */
layui.extend({
    cryptojs: '/platform/xbr_layui_extend/libs/cryptojs',
    request: '/platform/xbr_layui_extend/libs/request',
    jsonViewer: '/platform/xbr_layui_extend/libs/jsonViewer/jsonViewer',
    configerjs: '/platform/xbr_layui_extend/libs/configerjs',
    echarts: '/platform/xbr_layui_extend/libs/echarts',
    lottie: '/platform/xbr_layui_extend/libs/lottie',

}).define(['cryptojs','request','jsonViewer',"configerjs","echarts","lottie"], function (exports) {
    const Class = function (id) {
        this.id = id;
    };
    //对外接口
    const admin = function (id) {
        return new Class(id);
    };
    const cryptojs = layui.cryptojs;
    const request = layui.request;
    const jsonViewer = layui.jsonViewer;
    const  configerjs=layui.configerjs;
    //插件方法转导
    admin.baseUrl = configerjs.url;
    admin.getParam=configerjs.getParam;
    admin.decrypt = cryptojs.decrypt;
    admin.encrypt = cryptojs.encrypt;
    admin.req = request.post;
    admin.saveToken= request.saveToken;
    admin.evalJson = jsonViewer.evalJson;
    //自定义方法区

    exports('admin', admin);
});
